#!/usr/bin/python
# -*- coding: UTF-8 -*-
arr = [
    [
        '王五',
        '北京市东城区某某大厦'
    ],
    [
        '李四',
        '北京市西城区某某大厦'
    ],
    [
        '黑土',
        '北京市大兴区某某大厦'
    ],
    [
        '龙1',
        '辽宁省某某地区某某大厦，010室'
    ],
    [
        '龙2',
        '辽宁省某某大厦'
    ],
    [
        '白云',
        '黑龙江省某某大厦'
    ],
]

obj = {} #分拣后的字典

for i in arr:
    endIndex = 0 #地区结束索引
    address = i[1] #地址

    if '省' in address:
        endIndex = address.find('省')
    elif '市' in address:
        endIndex = address.find('市')
    
    name = address[0:endIndex+1]
    
    if name in obj:
        obj[name].append(i)
    else:
        obj[name] = [i]


for i in obj:
    print(obj[i])